package com.studycloud.service;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author JP
 */
@Component
@FeignClient(value ="CLOUD-PAYMENT-HYSTRIX-SERVICE",fallback = PaymentFallbackService.class)
public interface PaymentFeignHystrixService
{
    /**
     * 正常访问测试  hystrix
     * @param id
     * @return
     */
    @GetMapping(value = "/payment/hystrix/paymentinfo_ok/{id}")
    String paymentInfo_OK(@PathVariable("id") Integer id);
    /**
     * 错误访问测试  hystrix
     * @param id
     * @return
     */
    @GetMapping(value = "/payment/hystrix/paymentinfo_no/{id}")
    String paymentInfo_NO(@PathVariable("id")Integer id);

}
